<template>
  <div>
    <el-button @click="go1">点击ios详细</el-button>
     <el-button @click="go2">点击ios修改</el-button>
     <!-- <el-button @click="go3">点击pcDetail</el-button> -->
     <!-- <el-button @click="go4">点击pc_detail</el-button> -->
     <el-button @click="go5">点击error</el-button>
     <el-button @click="go6">点击pc</el-button>
     <el-button @click="go7">点击screen</el-button>
      <img :src="url"/>
  </div>
</template>

<script>
import QRCode from 'qrcode'
export default {
  name: 'test',
  data () {
    return {
      url: ''
    }
  },
  mounted () {
    const self = this
    QRCode.toDataURL('123456', { errorCorrectionLevel: 'H', version: 1 },
      function (err, url) {
        if (!err) {
          self.url = url
        }
      }
    )
  },
  methods: {
    go1 () {
      this.$router.push('/detail?id=1411867589679910912&msg=1')
    },
    go2 () {
      this.$router.push('/submit?encode={"computerId":"I1","testDevicePhone":{"brand":"APPLE","diskCapacity":"128 GB","id":"9369119176580360167","phoneType":"IOS","productType":"IPHONE11,8","regulatoryModel":"A2108","saleModel":"MT1E2CH/A","sn":"G0NXL3FZKXM8"}}')
    },
    go3 () {
      this.$router.push('/pcDetail?id=1367763365501472768&msg=1')
    },
    go4 () {
      this.$router.push('/pc_detail')
    },
    go5 () {
      const msg = '{"boardSn":"/J3N5962/CN7016355/","deviceName":"SPACE-SAVING","imgPaths":[],"originBrand":"DELL","originModel":"OPTIPLEX 3020","poId":"PO-2021-05-0014","sysSn":"J3N5962","testUserId":72,"userName":""}'
      this.$router.push('/error?msg=' + msg)
    },
    go6 () {
      this.$router.push('/pc?id=1418127567260618752')
    },
    go7 () {
      // 1393100715345448960
      this.$router.push('/screen?id=1396731627572432896')
    }
  }
}
</script>

<style>

</style>
